from threading import Event, Thread
from time import sleep


def eat(name):
    print(f'{name}已就坐')
    event.wait()

    print(f'{name}准备开吃了')


if __name__ == '__main__':
    event = Event()
    t1 = Thread(target=eat, args=('金球',))
    t2 = Thread(target=eat, args=('家俊',))
    t1.start()
    t2.start()
    sleep(5)
    print('可以开吃了')
    event.set()
